import request from '@/utils/request';
import downloader from '@/utils/downloader';
//查询
export function organizationTree(data) {
  return request({
    url: '/admin/user/organization/organizationTree',
    method: 'get',
    params: data,
  });
}

//新增
export function organizationSave(data) {
  return request({
    url: '/admin/user/organization/organizationSave',
    method: 'post',
    data,
  });
}

//修改
export function organizationUpdate(data) {
  return request({
    url: '/admin/user/organization/organizationUpdate',
    method: 'post',
    data,
  });
}

//删除
export function organizationRemove(data) {
  return request({
    url: '/admin/user/organization/organizationRemove',
    method: 'DELETE',
    params: data,
  });
}

export function downloadTemplate(data) {
  return downloader({
    url: '/admin/user/organization/download',
      method: 'get',
      headers: {
      'Content-Type': 'application/x-www-form-urlencoded', // 设置请求内容类型，根据实际需求修改
    },
    params: data,
      });
}


//批量导入设备
export function importClass(data) {
  return request({
    url: '/admin/user/organization/importOrganization',
    method: 'POST',
    data,
  });
}